<template>
	<view class="mainpadding2">
		<view class="xiahuaxian margin_top" v-for="item in 3">
			<view class="flexbetween">
				<view class="shilitu">
					<!-- <image src="../static/image/system/banner1.png" mode=""></image> -->
				</view>
				<view class="" style="width: 69%;">
					<view class="titletext xiaohei fonweight yhxk">XXX课程名称 </view>
					<view class="strongtext xiaohui nofonweight margin_top2">课程名称内容 </view>
					<view class="flexbetween margin_top2">
						<view class="titletext xiaohong fonweight">¥ 500</view>
						<view class="xiaolvbtn" v-show="type == 1" >团购</view>
						<view class="xiaolvbtn" v-show="type == 2" >抢购</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type: "",
				text: "",
			}
		},
		onLoad(options) {
			this.type = options.id
			let text = ""
			if (this.type == 1) {
				this.text = "推荐课程"
			} else if (this.type == 2) {
				this.text = "推荐机构"
			} 
			uni.setNavigationBarTitle({
				title: this.text
			});
		},
		methods: {
			tzxq(i) {
				uni.navigateTo({
					url: '/pages_homepage/miaoshakecxq?id=' + i
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.xiaolvbtn {
		width: 112rpx;
		height: 56rpx;
		background: #1BA95B;
		border-radius: 32rpx 32rpx 32rpx 32rpx;
		font-size: 26rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.shilitu {
		width: 200rpx;
		height: 160rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}
</style>